package com.yanqu.road.server.cmd.activity.climbtower;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.ClimbTowerProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.climbtower.CrossClimbTowerMgr;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_CLIMB_TOWER_UPDATE_TOP_ABILITY, desc = "更新新幻境实力")
public class CrossClimbTowerUpdateTopAbilityCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        ClimbTowerProto.ClimbTowerCrossUpdateAbilityReqMsg reqMsg = ClimbTowerProto.ClimbTowerCrossUpdateAbilityReqMsg.parseFrom(packet.getBytes());
        CrossClimbTowerMgr.updateTopCellAbility(reqMsg.getActivityId(), serverId, packet.getPlayerId(), reqMsg.getAbility(), reqMsg.getTopCellNum());
    }

    @Override
    public void sendData() {

    }
}
